﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClassLibrary.BLL;

namespace WindowsFormsApplication1
{
    public partial class ChiTietDonHang : Form
    {
        BLLDonHang donhang;
        public ChiTietDonHang()
        {
            InitializeComponent();
        }
        public ChiTietDonHang(BLLDonHang _donhang):this()
        {
            donhang = _donhang;
        }
        private void ChiTietDonHang_Load(object sender, EventArgs e)
        {
            List<BLLDonHang> ldh = new List<BLLDonHang>();
            ldh = new BLLDonHang(donhang.ID,donhang.IDKhach).GetChiTiet();
            lbMaDH.Text = ldh[0].MaDH.ToString();
            LbTenDH.Text = ldh[0].TenDH.ToString();
            lbNgayxuat.Text = ldh[0].NgayXuat.ToString();
            LbTongTien.Text = ldh[0].TongTien.ToString();
            lbmakh.Text = ldh[0].KhachHang[0].ID.ToString();
            lbusername.Text = ldh[0].KhachHang[0].UserName;
            lbtenkh.Text = ldh[0].KhachHang[0].HoTen;
            lbdiachi.Text = ldh[0].KhachHang[0].DiaChi;
            lbsodt.Text = ldh[0].KhachHang[0].SoDT.ToString();
          

        }
    }
}
